Ini adalah sedikit tambahan dari artikel ini, yaitu berupa perbandingan menit bermain pemain FC Barcelona di La Liga 2021/2022 pada era sebelum dengan saat FC Barcelona dilatih oleh Xavi Hernandez, sampai tanggal 24 Maret 2022.
Data berasal dari situs football-reference, dengan melihat "Match Report" dari setiap pertandingan. Untuk memperoleh dataset yang sudah rapi, silakan klik di sini.
import pandas as pd
import numpy as np
import chart_studio.plotly as py
import plotly.graph_objects as go
import nbformat
import plotly.offline as pyo
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode()
df = pd.read_excel("minutes-played.xlsx")
df
| player_name | gw_01 | gw_02 | gw_03 | gw_04 | gw_05 | gw_06 | gw_07 | gw_08 | gw_09 | ... | gw_22 | gw_23 | gw_24 | gw_25 | gw_26 | gw_27 | gw_28 | pre_xavi | xavi | total_min | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Depay | 89 | 90 | 90 | 90 | 90 | 90 | 90 | 90 | 90 | ... | 0 | 0 | 0 | 9 | 16 | 18 | 20 | 1079 | 363 | 1442 |
| 1 | Lenglet | 1 | 0 | 90 | 0 | 0 | 2 | 5 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 29 | 0 | 209 | 272 | 481 |
| 2 | Braithwaite | 90 | 61 | 73 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 11 | 0 | 224 | 11 | 235 |
| 3 | Griezmann | 90 | 90 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0 | 263 |
| 4 | Pedri | 90 | 61 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 65 | 87 | 31 | 90 | 90 | 72 | 85 | 151 | 609 | 760 |
| 5 | F. de Jong | 70 | 90 | 90 | 90 | 64 | 0 | 90 | 90 | 76 | ... | 90 | 61 | 59 | 24 | 67 | 0 | 70 | 750 | 1012 | 1762 |
| 6 | Roberto | 20 | 29 | 73 | 45 | 45 | 0 | 45 | 70 | 14 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0 | 400 |
| 7 | Busquets | 82 | 90 | 90 | 73 | 90 | 90 | 90 | 90 | 90 | ... | 90 | 90 | 90 | 86 | 90 | 90 | 90 | 1055 | 1333 | 2388 |
| 8 | Gonzalez | 8 | 0 | 17 | 0 | 18 | 90 | 45 | 20 | 0 | ... | 25 | 19 | 20 | 4 | 23 | 0 | 5 | 418 | 609 | 1027 |
| 9 | Alba | 90 | 90 | 90 | 0 | 0 | 0 | 0 | 90 | 90 | ... | 90 | 71 | 90 | 0 | 90 | 78 | 85 | 720 | 1114 | 1834 |
| 10 | Pique | 90 | 30 | 0 | 16 | 90 | 90 | 90 | 90 | 90 | ... | 90 | 89 | 0 | 90 | 90 | 61 | 90 | 745 | 1149 | 1894 |
| 11 | Garcia | 82 | 89 | 0 | 90 | 0 | 90 | 0 | 90 | 90 | ... | 0 | 45 | 45 | 0 | 0 | 90 | 90 | 756 | 754 | 1510 |
| 12 | Araujo | 8 | 60 | 90 | 90 | 90 | 10 | 90 | 0 | 0 | ... | 90 | 45 | 90 | 90 | 90 | 0 | 90 | 483 | 1128 | 1611 |
| 13 | Dest | 70 | 81 | 28 | 90 | 79 | 88 | 85 | 86 | 90 | ... | 20 | 90 | 90 | 90 | 6 | 0 | 0 | 877 | 476 | 1353 |
| 14 | Emerson | 20 | 9 | 62 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0 | 91 |
| 15 | Neto | 90 | 90 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 180 | 0 | 180 |
| 16 | Demir | 0 | 29 | 0 | 74 | 45 | 10 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 3 | 192 |
| 17 | ter Stegen | 0 | 0 | 90 | 90 | 90 | 90 | 90 | 90 | 90 | ... | 90 | 90 | 90 | 90 | 90 | 90 | 90 | 900 | 1440 | 2340 |
| 18 | Mingueza | 0 | 0 | 7 | 49 | 90 | 80 | 74 | 20 | 45 | ... | 0 | 0 | 45 | 0 | 0 | 12 | 0 | 534 | 257 | 791 |
| 19 | Gavi | 0 | 0 | 17 | 31 | 72 | 80 | 74 | 70 | 84 | ... | 70 | 71 | 80 | 66 | 45 | 90 | 20 | 593 | 984 | 1577 |
| 20 | L. de Jong | 0 | 0 | 0 | 45 | 67 | 80 | 16 | 0 | 6 | ... | 0 | 3 | 10 | 5 | 0 | 0 | 0 | 221 | 356 | 577 |
| 21 | Coutinho | 0 | 0 | 0 | 59 | 23 | 58 | 63 | 32 | 45 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 100 | 503 |
| 22 | Fati | 0 | 0 | 0 | 0 | 0 | 10 | 27 | 58 | 73 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0 | 213 |
| 23 | Balde | 0 | 0 | 0 | 41 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 2 | 99 |
| 24 | Pedrola | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 11 |
| 25 | Akhomach | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 124 |
| 26 | Abde | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 558 | 580 |
| 27 | Alves | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 68 | 0 | 0 | 90 | 84 | 90 | 5 | 0 | 427 | 427 |
| 28 | Aguero | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 17 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0 | 151 |
| 29 | Aubameyang | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 30 | 29 | 80 | 85 | 74 | 72 | 70 | 0 | 440 | 440 |
| 30 | Sanz | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 29 |
| 31 | Puig | 0 | 0 | 0 | 17 | 11 | 32 | 16 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 18 | 0 | 129 | 191 | 320 |
| 32 | Jutgla | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 301 | 301 |
| 33 | Torres | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 90 | 90 | 90 | 66 | 45 | 79 | 90 | 0 | 640 | 640 |
| 34 | Dembele | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 19 | 70 | 24 | 74 | 90 | 79 | 0 | 754 | 754 |
| 35 | Traore | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 60 | 90 | 10 | 81 | 16 | 0 | 11 | 0 | 268 | 268 |
| 36 | Umtiti | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 90 |
37 rows × 32 columns
min_play = df[["player_name","pre_xavi","xavi","total_min"]]
min_play
| player_name | pre_xavi | xavi | total_min | |
|---|---|---|---|---|
| 0 | Depay | 1079 | 363 | 1442 |
| 1 | Lenglet | 209 | 272 | 481 |
| 2 | Braithwaite | 224 | 11 | 235 |
| 3 | Griezmann | 263 | 0 | 263 |
| 4 | Pedri | 151 | 609 | 760 |
| 5 | F. de Jong | 750 | 1012 | 1762 |
| 6 | Roberto | 400 | 0 | 400 |
| 7 | Busquets | 1055 | 1333 | 2388 |
| 8 | Gonzalez | 418 | 609 | 1027 |
| 9 | Alba | 720 | 1114 | 1834 |
| 10 | Pique | 745 | 1149 | 1894 |
| 11 | Garcia | 756 | 754 | 1510 |
| 12 | Araujo | 483 | 1128 | 1611 |
| 13 | Dest | 877 | 476 | 1353 |
| 14 | Emerson | 91 | 0 | 91 |
| 15 | Neto | 180 | 0 | 180 |
| 16 | Demir | 189 | 3 | 192 |
| 17 | ter Stegen | 900 | 1440 | 2340 |
| 18 | Mingueza | 534 | 257 | 791 |
| 19 | Gavi | 593 | 984 | 1577 |
| 20 | L. de Jong | 221 | 356 | 577 |
| 21 | Coutinho | 403 | 100 | 503 |
| 22 | Fati | 213 | 0 | 213 |
| 23 | Balde | 97 | 2 | 99 |
| 24 | Pedrola | 0 | 11 | 11 |
| 25 | Akhomach | 0 | 124 | 124 |
| 26 | Abde | 22 | 558 | 580 |
| 27 | Alves | 0 | 427 | 427 |
| 28 | Aguero | 151 | 0 | 151 |
| 29 | Aubameyang | 0 | 440 | 440 |
| 30 | Sanz | 0 | 29 | 29 |
| 31 | Puig | 129 | 191 | 320 |
| 32 | Jutgla | 0 | 301 | 301 |
| 33 | Torres | 0 | 640 | 640 |
| 34 | Dembele | 0 | 754 | 754 |
| 35 | Traore | 0 | 268 | 268 |
| 36 | Umtiti | 0 | 90 | 90 |
Dari dataset di atas, akan kita bagi menjadi 3 bahasan, yaitu:
1. Starting Lineup (11 pemain dengan menit bermain terbanyak) FC Barcelona di La Liga 2021/2022
2. Starting Lineup (11 pemain dengan menit bermain terbanyak) FC Barcelona di La Liga 2021/2022 sebelum dilatih Xavi Hernandez
3. Starting Lineup (11 pemain dengan menit bermain terbanyak) FC Barcelona di La Liga 2021/2022 era Xavi Hernandez
min_play_total = min_play.sort_values("total_min", ascending=False)
min_play_total = min_play_total.head(11)
min_play_total
| player_name | pre_xavi | xavi | total_min | |
|---|---|---|---|---|
| 7 | Busquets | 1055 | 1333 | 2388 |
| 17 | ter Stegen | 900 | 1440 | 2340 |
| 10 | Pique | 745 | 1149 | 1894 |
| 9 | Alba | 720 | 1114 | 1834 |
| 5 | F. de Jong | 750 | 1012 | 1762 |
| 12 | Araujo | 483 | 1128 | 1611 |
| 19 | Gavi | 593 | 984 | 1577 |
| 11 | Garcia | 756 | 754 | 1510 |
| 0 | Depay | 1079 | 363 | 1442 |
| 13 | Dest | 877 | 476 | 1353 |
| 8 | Gonzalez | 418 | 609 | 1027 |
fig = go.Figure()
fig.add_trace(go.Bar(
y=min_play_total["player_name"],
x=min_play_total["pre_xavi"],
name='pre-Xavi',
orientation='h',
marker=dict(
color='rgba(200, 50, 50, 0.4)',
line=dict(color='rgba(200, 50, 50, 1.0)', width=3)
)
))
fig.add_trace(go.Bar(
y=min_play_total["player_name"],
x=min_play_total["xavi"],
name='Xavi',
orientation='h',
marker=dict(
color='rgba(10, 50, 180, 0.6)',
line=dict(color='rgba(10, 50, 180, 1.0)', width=3)
)
))
fig.update_traces(hovertemplate="Nama Pemain: %{y} <br>Menit bermain: %{x} menit ")
fig.update_layout(
title="11 Pemain FC Barcelona dengan Total Menit Bermain Terbanyak<br>di La Liga 2021/2022<br><sup>data s/d 24 Maret 2022</sup>",
barmode='stack',
xaxis={"title" : "menit"},
yaxis={"categoryorder":"total ascending"})
pyo.iplot(fig, filename="top11-total")
min_play_pre_xavi = min_play[["player_name","pre_xavi"]].sort_values("pre_xavi", ascending=False)
min_play_pre_xavi = min_play_pre_xavi.head(11)
min_play_pre_xavi
| player_name | pre_xavi | |
|---|---|---|
| 0 | Depay | 1079 |
| 7 | Busquets | 1055 |
| 17 | ter Stegen | 900 |
| 13 | Dest | 877 |
| 11 | Garcia | 756 |
| 5 | F. de Jong | 750 |
| 10 | Pique | 745 |
| 9 | Alba | 720 |
| 19 | Gavi | 593 |
| 18 | Mingueza | 534 |
| 12 | Araujo | 483 |
fig = go.Figure(go.Bar(
y=min_play_pre_xavi["player_name"],
x=min_play_pre_xavi["pre_xavi"],
name='pre-Xavi',
orientation='h',
marker=dict(
color='rgba(200, 50, 50, 0.4)',
line=dict(color='rgba(200, 50, 50, 1.0)', width=3)
),
hovertemplate="Nama Pemain: %{y} <br>Menit bermain: %{x} menit "))
fig.update_layout(
title="11 Pemain FC Barcelona dengan Total Menit Bermain Terbanyak<br>di La Liga 2021/2022 sebelum dilatih Xavi Hernandez<br><sup>data s/d 24 Maret 2022</sup>",
barmode='stack',
xaxis={"title" : "menit"},
yaxis={"categoryorder":"total ascending"})
pyo.iplot(fig, filename="top11-pre-xavi")
min_play_xavi = min_play[["player_name","xavi"]].sort_values("xavi", ascending=False)
min_play_xavi = min_play_xavi.head(11)
min_play_xavi
| player_name | xavi | |
|---|---|---|
| 17 | ter Stegen | 1440 |
| 7 | Busquets | 1333 |
| 10 | Pique | 1149 |
| 12 | Araujo | 1128 |
| 9 | Alba | 1114 |
| 5 | F. de Jong | 1012 |
| 19 | Gavi | 984 |
| 34 | Dembele | 754 |
| 11 | Garcia | 754 |
| 33 | Torres | 640 |
| 4 | Pedri | 609 |
fig = go.Figure(go.Bar(
y=min_play_xavi["player_name"],
x=min_play_xavi["xavi"],
name='Xavi',
orientation='h',
marker=dict(
color='rgba(10, 50, 180, 0.6)',
line=dict(color='rgba(10, 50, 180, 1.0)', width=3)
),
hovertemplate="Nama Pemain: %{y} <br>Menit bermain: %{x} menit "))
fig.update_layout(
title="11 Pemain FC Barcelona dengan Total Menit Bermain Terbanyak di La Liga 2021/2022<br>Era Kepelatihan Xavi Hernandez<br><sup>data s/d 24 Maret 2022</sup>",
barmode='stack',
xaxis={"title" : "menit"},
yaxis={"categoryorder":"total ascending"})
pyo.iplot(fig, filename="top11-xavi")